More groundwork for future PQ changes.
authorrobertlipe@gmail.com <robertlipe@gmail.com@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 12 Dec 2011 03:25:27 +0000 (03:25 +0000)
committerrobertlipe@gmail.com <robertlipe@gmail.com@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 12 Dec 2011 03:25:27 +0000 (03:25 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4135 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/defs.h
gpsbabel/gpx.c
gpsbabel/waypt.c

index 8949d63b88cf8f65eb9efcab8b6cd534255046ab..9ff118962b4c36cea7ce2bad1d59ea54a40370ff 100644 (file)
@@ -280,6 +280,8 @@ typedef struct {
   char* hint; /* all these UTF8, XML entities removed, May be not HTML. */
   utf_string desc_short;
   utf_string desc_long;
+  int favorite_points;
+  char* personal_note;
 } geocache_data ;
 
 typedef struct xml_tag {
index b5c64c797aa497b306b53c6eaee64a408b061ba6..96f5963afc0d27a602b7cf74a555f3bd84a5b219 100644 (file)
@@ -134,6 +134,8 @@ typedef enum {
   tt_cache_log_type,
   tt_cache_log_date,
   tt_cache_placer,
+  tt_cache_favorite_points,
+  tt_cache_personal_note,
 
   tt_wpt_extensions,
 
@@ -324,6 +326,8 @@ tag_mapping tag_path_map[] = {
   GEOTAG(tt_cache_desc_short,  "short_description"),
   GEOTAG(tt_cache_desc_long,   "long_description"),
   GEOTAG(tt_cache_placer,      "owner"),
+  GEOTAG(tt_cache_favorite_points,     "favorite_points"),
+  GEOTAG(tt_cache_personal_note,       "personal_note"),
   { tt_cache_log_wpt, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:log_wpt"},
   { tt_cache_log_wpt, 1, "/gpx/wpt/extensions/cache/logs/log/log_wpt"},
   { tt_cache_log_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:type"},
@@ -1010,6 +1014,12 @@ gpx_end(void* data, const XML_Char* xml_el)
     }
     gc_log_date = 0;
     break;
+  case tt_cache_favorite_points:
+    waypt_alloc_gc_data(wpt_tmp)->favorite_points  = atoi(cdatastrp);
+    break;
+  case tt_cache_personal_note:
+    waypt_alloc_gc_data(wpt_tmp)->personal_note  = xstrdup(cdatastrp);
+    break;
 
     /*
      * Garmin-waypoint-specific tags.
index 24bb8c650762191fa9fd8a134ad5c76f71b174d1..ff83eb3d325b80bcd1ba33bfeeda342c5c3316df 100644 (file)
@@ -441,6 +441,9 @@ waypt_free(waypoint *wpt)
     if (gc_data->hint) {
       xfree(gc_data->hint);
     }
+    if (gc_data->personal_note) {
+      xfree(gc_data->personal_note);
+    }
     xfree(gc_data);
   }
   fs_chain_destroy(wpt->fs);